package com.colin.springbootsource.event;

import org.springframework.stereotype.Component;

/**
 * @author: Colin
 * 2019/12/22 13:53
 * @desc todo
 * @email zhaod@oceansoft.com.cn
 */
@Component
public class RainListener implements WeatherListener{
    @Override
    public void onWeatherEvent(WeatherEvent event) {
        if (event instanceof RainEvent){
      System.out.println("hello " + event.getWeather());
        }
    }
}
